<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
<f:view contentType="text/html" />

<h:head>
	<title>Create CourseAuthor!</title>
</h:head>
<h:body bgcolor="white">
	<h:form id="CourseForm">
		<h:panelGrid id="CourseTable" columns="2">
			<h:outputLabel for="courseName">
				<h:outputText id="courseNameLabel" value="Course Name:" />
			</h:outputLabel>

			<h:inputText id="courseName" value="#{couseBean.courseName}" required="true" />
			
			<h:outputLabel for="courseDesc">
				<h:outputText id="courseDescLabel" value="Course Description:" />
			</h:outputLabel>

			<h:inputText id="courseDesc" value="#{couseBean.courseDesc}" required="true" />
			
			<h:outputLabel for="subjectId">
				<h:outputText id="subjectDescLabel" value="Subject Name:" />
			</h:outputLabel>
			
			<h:selectOneMenu id="subjectId" value="#{couseBean.subjectId}" required="true">
					<f:selectItems id="subjectList" value="#{couseBean.subjectList}"></f:selectItems>
			</h:selectOneMenu>
			
			<h:outputLabel for="authorId">
				<h:outputText id="authorDescLabel" value="Author Name:" />
			</h:outputLabel>
			<h:selectOneMenu id="authorId" value="#{couseBean.authorId}" required="true">
					<f:selectItems id="authorList" value="#{couseBean.authorList}"></f:selectItems>
			</h:selectOneMenu>

			<h:commandButton id="submit"
				action="#{couseBean.createCourse}" value="Create Course" />
		</h:panelGrid>
	</h:form>
</h:body>
</html>
